package com.uphone.edwards.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.uphone.edwards.R;

import java.util.ArrayList;
import java.util.List;

/**
 * 个人中心-我的知心医生页面的数据adapter
 * Created by a on 2017/12/15.
 */
public class MainJikanAdapter extends RecyclerView.Adapter<MainJikanAdapter.ViewHolder>{

    private Context mContext;
    public List<String> mMyDoctors = new ArrayList<>();

    public MainJikanAdapter( Context context) {
        mContext = context;
    }
    public void addData(List< String > myDoctors){
        mMyDoctors.addAll(myDoctors);
        notifyDataSetChanged();
    }
    @Override
    public ViewHolder onCreateViewHolder(final ViewGroup parent, final int viewType ) {
        View view = LayoutInflater.from(mContext).inflate(R.layout.item_main_heng,parent,false);
        return  new ViewHolder(view) ;
    }
    @Override
    public void onBindViewHolder( final ViewHolder holder, final int position ) {

    }
    @Override
    public int getItemCount() {
        return mMyDoctors.size();
    }
    public class ViewHolder extends RecyclerView.ViewHolder {

        public ViewHolder( final View itemView ) {
            super(itemView);
        }
    }
}